go/types.Checker.sprintf (method)

51 uses

	go/types (current package)
		assignments.go#L72: 			msg := check.sprintf("cannot use %s as %s value in %s", x, target, context)
		assignments.go#L326: 			s = check.sprintf("%s", t)
		assignments.go#L334: 					s = check.sprintf("%s", t.elem)
		call.go#L666: 		context := check.sprintf("argument to %s", call.Fun)
		conversions.go#L65: 				cause = check.sprintf("%s does not contain specific types", T)
		conversions.go#L74: 					cause = check.sprintf("constant %s overflows %s (in %s)", x.val, u, T)
		conversions.go#L76: 					cause = check.sprintf("cannot convert %s to type %s (in %s)", x, u, T)
		conversions.go#L239: 			msg := check.sprintf(format, args...)
		errors.go#L61: 	err.desc = append(err.desc, errorDesc{at, err.check.sprintf(format, args...)})
		errors.go#L254: 	msg := check.sprintf(format, args...)
		errsupport.go#L76: 			return check.sprintf("unknown field %s in struct literal of type %s", sel, typ)
		errsupport.go#L78: 			return check.sprintf("unknown field %s in struct literal of type %s, but does have %s", sel, typ, alt)
		errsupport.go#L80: 			return check.sprintf("unknown field %s in struct literal of type %s, but does have unexported %s", sel, typ, alt)
		errsupport.go#L82: 			return check.sprintf("cannot refer to unexported field %s in struct literal of type %s", alt, typ)
		errsupport.go#L94: 			return check.sprintf("type %s has no field or method %s", typ, sel)
		errsupport.go#L96: 			return check.sprintf("type %s has no field or method %s, but does have %s %s", typ, sel, what, alt)
		errsupport.go#L98: 			return check.sprintf("type %s has no field or method %s, but does have unexported %s %s", typ, sel, what, alt)
		errsupport.go#L100: 			return check.sprintf("cannot refer to unexported %s %s", what, alt)
		expr.go#L509: 		cause = check.sprintf("mismatched types %s and %s", x.typ(), y.typ())
		expr.go#L588: 			cause = check.sprintf("type parameter %s cannot use operator %s", errOp.typ(), op)
		expr.go#L593: 				what = check.sprintf("%s", errOp.typ())
		expr.go#L595: 			cause = check.sprintf("operator %s not defined on %s", op, what)
		format.go#L91: func (check *Checker) sprintf(format string, args ...any) string {
		instantiate.go#L209: 	msg := check.sprintf("%s type arguments for type %s: have %d, want %d", qual, name, got, want)
		instantiate.go#L265: 				detail = check.sprintf("%s is not an interface", T)
		instantiate.go#L267: 			*cause = check.sprintf("%s does not %s %s (%s)", V, verb, T, detail)
		instantiate.go#L289: 			*cause = check.sprintf("cannot %s %s (empty type set)", verb, T)
		instantiate.go#L297: 			*cause = check.sprintf("%s does not %s %s %s", V, verb, T, *cause)
		instantiate.go#L320: 				*cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb)
		instantiate.go#L325: 			*cause = check.sprintf("%s does not %s comparable", V, verb)
		instantiate.go#L343: 				*cause = check.sprintf("%s does not %s %s", V, verb, T)
		instantiate.go#L372: 				detail = check.sprintf("possibly missing ~ for %s in %s", alt, T)
		instantiate.go#L374: 				detail = check.sprintf("%s mentions %s, but %s is not in the type set of %s", T, V, V, T)
		instantiate.go#L376: 				detail = check.sprintf("%s missing in %s", V, Ti.typeSet().terms)
		instantiate.go#L378: 			*cause = check.sprintf("%s does not %s %s (%s)", V, verb, T, detail)
		lookup.go#L492: 				*cause = check.sprintf("(missing method %s)", m.Name())
		lookup.go#L496: 			*cause = check.sprintf("(missing method %s)\n\t\thave %s\n\t\twant %s", m.Name(), fs, ms)
		lookup.go#L498: 			*cause = check.sprintf("(unexported method %s)", m.Name())
		lookup.go#L514: 				*cause = check.sprintf("(wrong type for method %s)", m.Name())
		lookup.go#L517: 			*cause = check.sprintf("(wrong type for method %s)\n\t\thave %s\n\t\twant %s", m.Name(), fs, ms)
		lookup.go#L519: 			*cause = check.sprintf("(ambiguous selector %s.%s)", V, m.Name())
		lookup.go#L521: 			*cause = check.sprintf("(method %s has pointer receiver)", m.Name())
		lookup.go#L523: 			*cause = check.sprintf("(%s.%s is a field, not a method)", V, m.Name())
		lookup.go#L525: 			*cause = check.sprintf("(%s method is marked 'nointerface')", m.Name())
		lookup.go#L574: 		return check.sprintf("type %s is pointer to type parameter, not type parameter", T)
		lookup.go#L576: 	return check.sprintf("type %s is pointer to interface, not interface", T)
		operand.go#L420: 			msg := check.sprintf(format, args...)
		range.go#L260: 				return bad(check.sprintf("func must be func(yield func(...) bool): in yield type, %s", err.format(check)))
		range.go#L274: 			return bad(check.sprintf("yield func of type %s cannot be variadic", cb))
		typexpr.go#L204: 			*cause = check.sprintf("%s is not a generic type", typ)
		under.go#L59: 	return check.sprintf(err.format_, err.args...)